import Detail from './components/Detail';
import * as dbBlog from '@/db/blog'

export default async function Page({ params, searchParams }) {
    params = await params;
    searchParams = await searchParams;

    let blogData = await dbBlog.getByID(params.id || 0);
    
    return (
        <>
            <h1>服务端渲染 / {params.id}</h1>
            <Detail data={blogData} params={params} searchParams={ searchParams}></Detail>
        </>
    )
}

export const metadata = {
    title: '服务端渲染 / 服务端渲染',
}